package com.itgt.renwu2;

import java.util.Scanner;

public class NestdeLoop {

	public static void main(String[] args) {
		String over = null;
		Scanner scanner = new Scanner(System.in);
		//��ѭ����������
		do {
			int a = 0; 
			int sum = 0;
			int avg = 0;
			System.out.println("������������");
			String name = scanner.next();
			//��ѭ������ÿ���˵�5�ſγ�
			for(int i=0;i<5;i++) {
				System.out.println("�������"+(i+1)+"�ſγ̳ɼ�");
				int score = scanner.nextInt();
				sum += score;
				a = i;
			}
			avg = sum/5;
			System.out.println("ѧ��������"+name);
			System.out.println("���ƿ�Ŀ��"+(a+1));
			System.out.println("�ֳܷɼ���"+sum);
			System.out.println("ƽ���ɼ���"+avg);
			System.out.println("���������𣿣�(y/n)");
			over = scanner.next();
		}while("y".equals(over) || "n".equals(over));
		System.out.println("�����˳�������");
	}

}
